package sing.cloud.alibaba.seata.service.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import sing.cloud.alibaba.seata.domain.CommonResult;

/**
 * @author xing
 * @date 2022/9/3 17:42
 */
@FeignClient(value = "seata-storage-service")
public interface IStorageFeignService {

    /**
     * 扣减库存
     */
    @PostMapping(value = "/storage/decrease")
    CommonResult decrease(@RequestParam("productId") Long productId, @RequestParam("count") Integer count);
}
